<?php
/**
 * Created by Forever.
 * User: Forever
 * Date: 2018/8/27 0027
 * Time: 上午 9:53
 */
namespace app\system\validate;
use think\Validate;
class Login extends Validate{
    // 验证规则
    protected $rule = [
        ['username','require','-10018'],
        ['password','require','-10019'],
        ['id','require','-10011'],
        
        ['iv','require','-10005'],
        ['cs_id','require','-10015'],
        ['signature','require','-10006'],
        ['growth_list','require|checkGrowth:growth_list','-10750'],

    ];

    protected $scene = [
        'login'=>['username','password'],
        'login_out'=>['id'],
        
        'user'=>['code','encryptData','iv','signature'],
    ];


    /**检查成长值
     * [checkData description]
     * @param  [type] $value [description]
     * @param  [type] $rule  [description]
     * @param  [type] $data  [description]
     * @return [type]        [description]
     */
    protected function checkGrowth($value,$rule,$data){
        return true;
    }


}